package day17.reflection.factory;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/8/6 0006
 */
public class PropUtils {
    private static Properties prop = new Properties();

    static{
        InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("tech/aistar/corejava/day17/reflection/factory/beanFactory.properties");
        try {
            prop.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getValue(String key){
        return prop.getProperty(key);
    }
}
